<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">

			<section class="wrapper">
				<!-- page start-->
				<section class="panel">
					<header class="panel-heading"> LISTING MANAGEMENT   <span class="pull-right"><a href="<?= base_url()?>secure/listing/listings/add" type="button" class="btn btn-success btn-sm">Add New</a></span> </header>
					<div class="panel-body">
					<div class="input-group col-lg-5 pull-right">
                                          <form name="action" method="POST"
							action="<?=base_url(); ?>secure/listing/listings">
							
							<div class="col-lg-offset-2 col-lg-7">
							</div>
							 <select class="form-control" name="filter" style="width:100px"
								onchange="this.form.submit()">
								<option value="">-Select-</option>
								<option value="inactive">Inactive</option>
								<option value="active">Active</option>
							
							</select>
						</form>
                                          
                                          
                                             
                                              </div>
						<table class="table table-striped table-advance table-hover">
							<thead>
								<tr>
									<th><i class="icon-bullhorn"></i> Image</th>
									<th class="hidden-phone"><i class="icon-bookmark"></i>
										 Listing Name</th>
									<th><i class="icon-bookmark"></i> Status</th>
									<th><i class=" icon-edit"></i> Action</th>
								</tr>
							</thead>
							<tbody>
							<?php if($listing['all']){?>
						<?php foreach ($listing['all'] as $listing) : ?>
								<tr>
									<th>
									<img width="80" src="<?= base_url();?>assets/images/photo/<?= $listing->photo;?>">
									</th>
									<td class="hidden-phone"><?= $listing->title; ?></td>
									<?php if($listing->status ==51){?>
									<td><button class="btn btn-success btn-xs">
											<i class=" icon-ok"> Active</i>
										</button></td>
									<?php }else{?>
									<td><button class="btn btn-danger btn-xs">
											<i class=" icon-remove"> Inactive</i>
										</button></td>
									<?php }?>
									<td>
										<div class="dropdown">
								<a href="javascript:;"
									class="dropdown-toggle btn btn-danger btn-xs"
									data-toggle="dropdown">Menu <b class="caret"></b>
								</a>
								<ul class="dropdown-menu width">
									<li>
									<?php if($listing->status ==1){?>
									<a href="<?= base_url(); ?>secure/listing/listings/change_business_status/<?= $listing->status;?>/<?= $listing->id; ?>" <?php if($this->config->item('mode')=='DEMO'){?>onclick="alert ('Sorry! Demo mode '); return false;" <?} else?>onclick="return confirm('Are you sure ?');" 
									><button
												class="btn btn-primary btn-xs">
												<i class="icon-thumbs-up"></i>
											</button> Active</a>
											
											</li>
											
									<li>
									<?php }else{?>
									<a href="<?= base_url(); ?>secure/listing/listings/change_business_status/<?= $listing->status;?>/<?= $listing->id; ?>" <?php if($this->config->item('mode')=='DEMO'){?>onclick="alert ('Sorry! Demo mode '); return false;" <?} else?>onclick="return confirm('Are you sure ?');"
									><button
												class="btn btn-danger btn-xs">
												<i class="icon-thumbs-down"></i>
											</button> Inactive</a>
											<?php }?>
											
											</li>
										 
									<li><a href="<?= base_url(); ?>secure/listing/listings/edit/<?= $listing->id;?>"
									<?php if($this->config->item('mode')=='DEMO'){?>
										onclick="alert ('Sorry! Demo mode '); return false;"
									<?} else?> onclick="return confirm('Are you sure ?');"><button
												class="btn btn-primary btn-xs">
												<i class="icon-pencil"></i>
											</button> Edit</a></li>
										<li><a href="<?= base_url();?>secure/listing/listings/add_logo/<?= $listing->id;?>"
									><button
												class="btn btn-primary btn-xs">
												<i class="icon-picture"></i>
											</button> Logo</a></li> 
									
									<li><a href="<?= base_url();?>secure/listing/listings/add_qualification/<?= $listing->id;?>"
									><button
												class="btn btn-primary btn-xs">
												<i class="icon-random"></i>
											</button> Qualification</a></li> 
								
								<li><a href="<?= base_url();?>secure/listing/listings/add_license/<?= $listing->id;?>"
									><button
												class="btn btn-primary btn-xs">
												<i class="icon-certificate"></i>
											</button> License</a></li> 
								
								<li><a href="<?= base_url();?>secure/listing/listings/add_association/<?= $listing->id;?>"
									><button
												class="btn btn-primary btn-xs">
												<i class="icon-check"></i>
											</button> Association</a></li> 
								
								<li><a href="<?= base_url();?>secure/listing/listings/add_awards/<?= $listing->id;?>"
									><button
												class="btn btn-primary btn-xs">
												<i class="icon-bookmark"></i>
											</button> Awards</a></li> 
								
									<li><a href="<?= base_url(); ?>secure/listing/listings/delete_business/<?= $listing->id;?>" <?php if($this->config->item('mode')=='DEMO'){?>onclick="alert ('Sorry! Demo mode '); return false;" <?} else?>onclick="return confirm('Are you sure ?');"
									><button
												class="btn btn-danger btn-xs">
												<i class="icon-trash"></i>
											</button> Delete</a></li>
							
							</div>
									</td>
								</tr>
								
								<?php endforeach; 
} else { echo "No Data found....";}?>
								</tbody>
						</table>

						<!--<div class="row"><div class="col-sm-6"><div class="dataTables_info" id="sample_1_info">Showing 1 to 10 of 25 entries</div></div><div class="col-sm-6"><div class="dataTables_paginate paging_bootstrap pagination"><ul><li class="prev disabled"><a href="#">← Prev</a></li><li class="active"><a href="#">1</a></li><li><a href="#">2</a></li><li><a href="#">3</a></li><li class="next"><a href="#">Next → </a></li></ul></div></div></div>-->
						
						
					</div>
					<!-- End of Body Panel -->
				</section>
				<!-- page end-->
			</section>

